//
//  LKCustomerModel.m
//  YLHelper
//
//  Created by she1323 on 2018/5/30.
//  Copyright © 2018年 she1323. All rights reserved.
//

#import "LKCustomerModel.h"

@implementation LKAppointmentModel

+(NSDictionary<NSString *,id> *)modelCustomPropertyMapper{
    return @{@"appointId":@"id"};
}



@end

@implementation LKCustomerDetailAttachModel
+(NSDictionary<NSString *,id> *)modelCustomPropertyMapper{
    return @{@"Id":@"id"};
}

@end



@implementation LKBankModel


+(NSDictionary<NSString *,id> *)modelCustomPropertyMapper{
    return @{@"Id":@"id"};
}

//Model 到字典

- (NSDictionary *)properties_aps

{
    
    NSMutableDictionary *props = [NSMutableDictionary dictionary];
    
    unsigned int outCount, i;
    
    objc_property_t *properties = class_copyPropertyList([self class], &outCount);
    
    for (i = 0; i < outCount; i++)
        
    {
        
        objc_property_t property = properties[i];
        
        const char* char_f = property_getName(property);
        
        NSString *propertyName = [NSString stringWithUTF8String:char_f];
        
        id propertyValue = [self valueForKey:(NSString *)propertyName];
        
        if (propertyValue) [props setObject:propertyValue forKey:propertyName];
        
    }
    
    free(properties);
    
    return props;
    
}

@end


@implementation LKCustomerModel

+(NSDictionary<NSString *,id> *)modelCustomPropertyMapper{
    return @{@"customerId":@"id"};
}

+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
    return @{@"bankCards":[LKBankModel class],@"customerAttach":[LKCustomerDetailAttachModel class]};
}
@end
